body {
	font-family: Arial, sans-serif;
	margin: 0;
	padding: 0;
	background-color: #f5f5f5;
}

.header {
	background-color: #007bff;
	color: white;
	padding: 10px 15px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	font-size: 16px;
	font-weight: bold;
}

.header img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	margin-right: 10px;
}

.chat-container {
	position: relative;
	top: 40px; /* 相对当前位置向下移动 20px */
	display: flex;
	flex-direction: column;
	height: 100vh;
}

.chat-box {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	background-color: #f0f0f0;
	border-bottom: 1px solid #ddd;
	max-height: calc(100vh - 150px);
}

.chat-message {
	display: flex;
	margin-bottom: 10px;
}

.chat-message .avatar {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-right: 10px;
}

.chat-message .avatar img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.chat-message .avatar .username {
	font-size: 12px;
	color: #333;
	margin-top: 5px;
}

.chat-message .message-content {
	max-width: 70%;
	padding: 10px;
	border-radius: 10px;
	background-color: #e0e0e0;
	word-wrap: break-word;
}

.chat-message.user .message-content {
	background-color: #007bff;
	color: white;
	margin-left: auto;
}

.input-area {
	display: flex;
	padding: 10px;
	background-color: #fff;
	border-top: 1px solid #ddd;
}

.input-area input {
	flex: 1;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 20px;
	margin-right: 10px;
	outline: none;
	font-size: 14px;
}

.input-area button {
	padding: 10px 20px;
	background-color: #007bff;
	border: none;
	border-radius: 20px;
	color: white;
	cursor: pointer;
}

.input-area button:hover {
	background-color: #0056b3;
}

@media (max-width: 768px) {
	.header {
		font-size: 14px;
	}

	.input-area input {
		font-size: 12px;
	}

	.chat-message .message-content {
		font-size: 14px;
	}

	.chat-container {
		height: calc(100vh - 40px);
	}

	.chat-box {
		max-height: calc(100vh - 180px);
	}
}
/* 确保body和html的高度是100%，避免内容溢出 */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* 确保页面整体容器占满整个屏幕 */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%; /* 填满整个页面高度 */
}

/* 聊天内容区，确保可以滚动 */
.chat-box {
  flex-grow: 1; /* 填满剩余空间 */
  overflow-y: auto; /* 内容超出时出现滚动条 */
  padding: 10px;
  background-color: #f9f9f9;
}

/* 输入框和发送按钮固定在页面底部 */
.input-area {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #fff;
  border-top: 1px solid #ccc;
  position: sticky; /* 设置为sticky，让它固定在底部 */
  bottom: 0;
  z-index: 1; /* 确保输入框在顶部区域之上 */
}

/* 输入框样式 */
.input-area input {
  flex-grow: 1; /* 填充输入框可用空间 */
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  margin-right: 10px;
}

/* 发送按钮样式 */
.input-area button {
  background-color: #007aff;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
}

.input-area button:hover {
  background-color: #005bb5;
}